//
//  NSString+GQHAPI.m
//  Seed
//
//  Created by GuanQinghao on 21/03/2018.
//  Copyright © 2018 GuanQinghao. All rights reserved.
//

#import "NSString+GQHAPI.h"

@implementation NSString (GQHAPI)

/// 服务器地址
+ (NSString *)URLString {
    
    NSString *domainURLString = @"https://kjwccy.jt169.com";
//    NSString *domainURLString = @"http://wccy.jt169.com";
//    NSString *domainURLString = @"http://192.168.199.136:8080";

    
//    return localURLString;
//    return debugURLString;
//    return releaseURLString;
    return domainURLString;
}

#pragma mark URL地址
/// 图片地址
+ (NSString *)qh_imageURLString {
    
    return [[NSString URLString] stringByAppendingString:@"/attached/image/"];
}

/// 接口地址
+ (NSString *)qh_APIURLString {
    
    return [[NSString URLString] stringByAppendingString:@"/app"];
}

#pragma mark 登录注册设置
/// 验证码
+ (NSString *)qh_APIUserCAPTCHA {
    
    NSString *APIString = @"/loginRegist/1/sendPhoneYzm";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 用户注册
+ (NSString *)qh_APIUserRegister {
    
    NSString *APIString = @"/loginRegist/1/saveRegister";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 用户登录
+ (NSString *)qh_APIUserLogin {
    
    NSString *APIString = @"/loginRegist/1/doLogin";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 修改密码
+ (NSString *)qh_APIUserUpdatePassword {
    
    NSString *APIString = @"/loginRegist/1/changePsd";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 绑定手机号
+ (NSString *)qh_APIUserBindMobile {
    
    NSString *APIString = @"/loginRegist/1/changePhoneNum";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 重置密码
+ (NSString *)qh_APIUserResetPassword {
    
    NSString *APIString = @"/loginRegist/1/forgetPsd";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 找车

/// 承运人关注路线
+ (NSString *)qh_APICheckShipperRoutes {
    
    NSString *APIString = @"/buFocusOnLine/1/EmptyCarNumlist";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 找货
/// 司机获取货源列表
+ (NSString *)qh_APICheckFreights {
    
    NSString *APIString = @"/buSources/1/list";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 司机关注路线
+ (NSString *)qh_APICheckDriverRoutes {
    
    NSString *APIString = @"/buFocusOnLine/1/Numlist";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 转账
/// 开户银行
+ (NSString *)qh_APICheckInBanks {
    
    NSString *APIString = @"/buPlatformBank/1/list";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 保存转账登记
+ (NSString *)qh_APICreateTransaction {
    
    NSString *APIString = @"/buOfflineRechargeRecord/1/save";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 转账明细列表
+ (NSString *)qh_APICheckTransactions {
    
    NSString *APIString = @"/buOfflineRechargeRecord/1/list";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}


#pragma mark 评价
/// 添加评价信息
+ (NSString *)qh_APICreateComment {
    
    NSString *APIString = @"/buAssessment/1/add";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 发布货源
/// 发到货源广场
+ (NSString *)qh_APIPostSupply {
    
    NSString *APIString = @"/buSources/1/save";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 发给熟车
+ (NSString *)qh_APIPushSupply {
    
    NSString *APIString = @"/buGoodsDeliveryPush/1/save";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 公共接口
/// 业务参数
+ (NSString *)qh_APICheckParameters {
    
    NSString *APIString = @"/common/1/getCodeMap";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 省
+ (NSString *)qh_APICheckProvinces {
    
    NSString *APIString = @"/buAdministrativeAreaTable/1/getProvinces";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 市
+ (NSString *)qh_APICheckCities {
    
    NSString *APIString = @"/buAdministrativeAreaTable/1/getCitys";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 县区
+ (NSString *)qh_APICheckDistricts {
    
    NSString *APIString = @"/buAdministrativeAreaTable/1/getCountys";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 发布空车
/// 发布空车
+ (NSString *)qh_APIPostFreeTruck {
    
    NSString *APIString = @"/buEmpty/1/save";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 我的车辆
/// 我的车辆
+ (NSString *)qh_APICheckDriverTruck {
    
    NSString *APIString = @"/buVehicleCertification/1/list";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 关注路线
/// 新增关注路线
+ (NSString *)qh_APICreateRoute {
    
    NSString *APIString = @"/buFocusOnLine/1/add";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}
/// 删除关注路线
+ (NSString *)qh_APIDeleteRoute {
    
    NSString *APIString = @"/buFocusOnLine/1/delete";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 认证信息
/// 认证司机基本信息
+ (NSString *)qh_APIVerifyDriverInfo {
    
    NSString *APIString = @"/myInformation/1/diverAut1";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 认证司机车辆信息
+ (NSString *)qh_APIVerifyTruckInfo {
    
    NSString *APIString = @"/myInformation/1/diverAut";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 认证物流企业信息
+ (NSString *)qh_APIVerifyEnterprise {
    
    NSString *APIString = @"/myInformation/1/LogisticsCom";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 认证货主信息
+ (NSString *)qh_APIVerifyOwner {
    
    NSString *APIString = @"/myInformation/1/shipperAut";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 查看认证信息
/// 查看司机车辆信息
+ (NSString *)qh_APICheckTruckInfo {
    
    NSString *APIString = @"/authInformation/1/authDiverMsgView";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 查看物流企业信息
+ (NSString *)qh_APICheckEnterprise {
    
    NSString *APIString = @"/authInformation/1/LogisticsComMsgView";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 查看货主信息
+ (NSString *)qh_APICheckOwner {
    
    NSString *APIString = @"/authInformation/1/shipperMsgView";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 发票
/// 提交发票信息
+ (NSString *)qh_APICreateInvoice {
    
    NSString *APIString = @"/buInvoice/1/save";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

#pragma mark 关注
/// 关注的货主
+ (NSString *)qh_APIOwnersFollowed {
    
    NSString *APIString = @"/buUsersAttention/1/mySources";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 取消关注
+ (NSString *)qh_APIUnfollowed {
    
    NSString *APIString = @"/buUsersAttention/1/delete";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

/// 添加关注
+ (NSString *)qh_APIFollowed {
    
    NSString *APIString = @"/buUsersAttention/1/save";
    
    return [NSString stringWithFormat:@"%@%@",[self qh_APIURLString],APIString];
}

@end
